#include "head.h" 
void readfile_F(Node* phead_F, char *filename_F){
	FILE *fp = fopen(filename_F,"ra");
	while(1){
		Faculty *s = (Faculty*)malloc(sizeof(Faculty));
		int count = fread(s,sizeof(Faculty),1,fp);
		if(count == 0){
			break;
		}
		Node *pnew = (Node*)malloc(sizeof(Node));
		pnew->data = s;
		pnew->next = NULL;
		pnew->next = phead_F->next;
		phead_F->next = pnew;
	}
	fclose(fp);
	return;
}

void readfile_W(Node* phead_W, char *filename_W){
	FILE *fp = fopen(filename_W,"ra");
	while(1){
		Wages *s = (Wages*)malloc(sizeof(Wages));
		int count = fread(s,sizeof(Wages),1,fp);
		if(count == 0){
			break;
		}
		Node *pnew = (Node*)malloc(sizeof(Node));
		pnew->data = s;
		pnew->next = NULL;
		pnew->next = phead_W->next;
		phead_W->next = pnew;
	}
	fclose(fp);
	return;
}
